This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
Kubelet race not setting correct pod env (KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT) #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT are sometimes not properly set by kubelet because of the known issue/race condition: kubernetes/kubernetes#40973.
When running a QuarkJob, the output-persist container continues with the default configuration, that later fails when running in a kubernetes cluster:
#output-persist
2021-09-22T09:48:28.108Z [34mINFO[0m internal/persist_output.go:79 does not exist, using default kube config
2021-09-22T09:48:28.109Z [34mINFO[0m internal/persist_output.go:83 Checking kube config
2021/09/22 09:48:28 Couldn't check Kubeconfig. Ensure kubeconfig is correct to continue.: invalid kube config: Get "http://localhost:8080/version?timeout=32s": dial tcp [::1]:8080: connect: connection refused
This change introduces a workaround as per the proposed solution (see https://github.com/kubernetes/kubernetes/blob/fa0387c9fea7cf4b3e3032bb384d8b5f99580154/pkg/kubelet/kubelet_pods.go#L395-L398):